package com.sanctuary.dao.interfaces;

import java.sql.SQLException;
import java.util.List;

import com.sanctuary.models.Comment;

public interface CommentDao {
	public int save (Comment c) throws SQLException;
	public int delete (Comment c) throws SQLException;
	
	/**
	 * Basically anything that can be commented on is an object. For example,
	 * a Post is an object, and will have an unique object ID. But also we
	 * need an "owner" in that a Post just describes for what comments we
	 * want to retrieve, but we need to know _what_ post. 
	 * 
	 * @param oid
	 * @param owner
	 * @return
	 * @throws SQLException
	 */
	public List<Comment> findByObjectAndOwner (int oid, int owner) throws SQLException;
	public List<Comment> findByUser(int uid) throws SQLException;
}
